when I declare the variable global and use it in another function it shows this error NameError: nam